<Grid MinWidth="800" MinHeight="600">
  <Grid.RowDefinitions>
    <RowDefinition Height="30" />
    <RowDefinition Height="*" />
    <RowDefinition Height="30" />
  </Grid.RowDefinitions>
  <Grid.ColumnDefinitions>
    <ColumnDefinition Width="*" MinWidth="620" />
    <ColumnDefinition Width="0.32*" MinWidth="150" />
  </Grid.ColumnDefinitions>
    
  <Grid Grid.Row="0" Grid.Column="0">
    <Grid.RowDefinitions>
      <RowDefinition Height="*" />
    </Grid.RowDefinitions>
    <Grid.ColumnDefinitions>
      <ColumnDefinition Width="*" />
      <ColumnDefinition Width="*" />
      <ColumnDefinition Width="*" />
      <ColumnDefinition Width="*" />
      <ColumnDefinition Width="*" />
    </Grid.ColumnDefinitions>  
    
    <Rectangle Fill="Black" Grid.ColumnSpan="5" />
    
    <Grid Grid.Row="0" Grid.Column="0">
      <Grid.RowDefinitions>
        <RowDefinition Height="*" />
      </Grid.RowDefinitions>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="auto" />
        <ColumnDefinition Width="*" />
      </Grid.ColumnDefinitions>  

      <TextBlock VerticalAlignment="Center" Grid.Row="0" Grid.Column="0" FontFamily="Swiss" FontSize="22">SHD</TextBlock>
      <StackPanel Orientation="Vertical" Grid.Row="0" Grid.Column="1">
        <ProgressBar x:Name="ShieldValue" Orientation="Horizontal" Height="15" Margin="5, 0, 5, 3" />
        <TextBlock x:Name="ShieldValueText" VerticalAlignment="Center" HorizontalAlignment="Center" FontFamily="Swiss" FontSize="13" />
      </StackPanel>
    </Grid>
    
    <Grid Grid.Row="0" Grid.Column="1">
      <Grid.RowDefinitions>
        <RowDefinition Height="*" />
      </Grid.RowDefinitions>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="auto" />
        <ColumnDefinition Width="*" />
      </Grid.ColumnDefinitions>  

      <TextBlock VerticalAlignment="Center" Grid.Row="0" Grid.Column="0" FontFamily="Swiss" FontSize="22">DAM</TextBlock>
      <StackPanel Orientation="Vertical" Grid.Row="0" Grid.Column="1">
        <ProgressBar x:Name="DamageValue" Orientation="Horizontal" Height="15" Margin="5, 0, 5, 3" />
        <TextBlock x:Name="DamageValueText" VerticalAlignment="Center" HorizontalAlignment="Center" FontFamily="Swiss" FontSize="13" />
      </StackPanel>
    </Grid>

    <Grid Grid.Row="0" Grid.Column="2">
      <Grid.RowDefinitions>
        <RowDefinition Height="*" />
      </Grid.RowDefinitions>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="auto" />
        <ColumnDefinition Width="*" />
      </Grid.ColumnDefinitions>  

      <TextBlock VerticalAlignment="Center" Grid.Row="0" Grid.Column="0" FontFamily="Swiss" FontSize="22">ETEMP</TextBlock>
      <StackPanel Orientation="Vertical" Grid.Row="0" Grid.Column="1">
        <ProgressBar x:Name="ETempValue" Orientation="Horizontal" Height="15" Margin="5, 0, 5, 3" />
        <TextBlock x:Name="ETempValueText" VerticalAlignment="Center" HorizontalAlignment="Center" FontFamily="Swiss" FontSize="13" />
      </StackPanel>
    </Grid>

    <Grid Grid.Row="0" Grid.Column="3">
      <Grid.RowDefinitions>
        <RowDefinition Height="*" />
      </Grid.RowDefinitions>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="auto" />
        <ColumnDefinition Width="*" />
      </Grid.ColumnDefinitions>  

      <TextBlock VerticalAlignment="Center" Grid.Row="0" Grid.Column="0" FontFamily="Swiss" FontSize="22">WTEMP</TextBlock>
      <StackPanel Orientation="Vertical" Grid.Row="0" Grid.Column="1">
        <ProgressBar x:Name="WTempValue" Orientation="Horizontal" Height="15" Margin="5, 0, 5, 3" />
        <TextBlock x:Name="WTempValueText" VerticalAlignment="Center" HorizontalAlignment="Center" FontFamily="Swiss" FontSize="13" />
      </StackPanel>
    </Grid>

    <Grid Grid.Row="0" Grid.Column="4">
      <Grid.RowDefinitions>
        <RowDefinition Height="*" />
      </Grid.RowDefinitions>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="auto" />
        <ColumnDefinition Width="*" />
      </Grid.ColumnDefinitions>  

      <TextBlock VerticalAlignment="Center" Grid.Row="0" Grid.Column="0" FontFamily="Swiss" FontSize="22">FUEL</TextBlock>
      <StackPanel Orientation="Vertical" Grid.Row="0" Grid.Column="1">
        <ProgressBar x:Name="FuelValue" Orientation="Horizontal" Height="15" Margin="5, 0, 5, 3" />
        <TextBlock x:Name="FuelValueText" VerticalAlignment="Center" HorizontalAlignment="Center" FontFamily="Swiss" FontSize="13" />
      </StackPanel>
    </Grid>
    
  </Grid>

  <Grid Grid.Row="1" Grid.Column="0">
    <Grid.RowDefinitions>
      <RowDefinition Height="0.75*" />
      <RowDefinition Height="0.25*" />
    </Grid.RowDefinitions>
    <Grid.ColumnDefinitions>
      <ColumnDefinition Width="3*" />
      <ColumnDefinition Width="4.5*" />
    </Grid.ColumnDefinitions>    

    <Grid Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Grid.RowSpan="2">
      <Rectangle StrokeThickness="2" Stroke="Black" /> 
      <Grid Margin="1, 1, 1, 1" x:Name="MainPlayfield" /> 
    </Grid>

    <ListBox x:Name="ChatHistory" Grid.Row="1" Grid.Column="0" Margin="0, 0, 10, 0" FontSize="22" FontFamily="Swiss" Foreground="White" />
        
  </Grid>

  <Grid Grid.Row="2" Grid.Column="0">
    <Grid.RowDefinitions>
      <RowDefinition Height="*" />
    </Grid.RowDefinitions>
    <Grid.ColumnDefinitions>
      <ColumnDefinition Width="3*" />
      <ColumnDefinition Width="*" />
      <ColumnDefinition Width="*" />
      <ColumnDefinition Width="*" />
      <ColumnDefinition Width="1.5*" />
    </Grid.ColumnDefinitions>    
  
    <Rectangle Fill="Black" Grid.ColumnSpan="5" />

    <TextBox x:Name="ChatEntry" FontSize="22" FontFamily="Swiss" Grid.Row="0" Grid.Column="0" Margin="0, 0, 10, 0" />
    
    <StackPanel Orientation="Horizontal" Grid.Row="0" Grid.Column="1">      
      <TextBlock VerticalAlignment="Center" HorizontalAlignment="Left" FontFamily="Swiss" FontSize="22">WRP</TextBlock>
      <Grid Margin="4, 0, 4, 0" Grid.Row="0" Grid.Column="1">
        <Rectangle Stretch="Fill" Fill="#FFFF9C00" RadiusX="3.0" RadiusY="3.0" />
        <TextBlock x:Name="WarpValue" Margin="10, 0, 10, 0" FontSize="22" FontFamily="Swiss" HorizontalAlignment="Left" VerticalAlignment="Center" Foreground="Black">88/88</TextBlock>
        <Rectangle Stretch="Fill" RadiusX="3.0" RadiusY="3.0" Fill="{StaticResource GlassHighlight}" />            
      </Grid>
    </StackPanel>

    <StackPanel Orientation="Horizontal" Grid.Row="0" Grid.Column="2">      
      <TextBlock  VerticalAlignment="Center" HorizontalAlignment="Left" FontFamily="Swiss" FontSize="22">KIL</TextBlock>
      <Grid Margin="4, 0, 4, 0" Grid.Row="0" Grid.Column="1">
        <Rectangle Stretch="Fill" Fill="#FFFF9C00" RadiusX="3.0" RadiusY="3.0" />
        <TextBlock x:Name="KillsValue" Margin="10, 0, 10, 0" FontSize="22" FontFamily="Swiss" HorizontalAlignment="Left" VerticalAlignment="Center" Foreground="Black">88.88</TextBlock>
        <Rectangle Stretch="Fill" RadiusX="3.0" RadiusY="3.0" Fill="{StaticResource GlassHighlight}" />            
      </Grid>
    </StackPanel>

    <StackPanel Orientation="Horizontal" Grid.Row="0" Grid.Column="3">      
      <TextBlock  VerticalAlignment="Center" HorizontalAlignment="Left" FontFamily="Swiss" FontSize="22">ARM</TextBlock>
      <Grid Margin="4, 0, 4, 0" Grid.Row="0" Grid.Column="1">
        <Rectangle Stretch="Fill" Fill="#FFFF9C00" RadiusX="3.0" RadiusY="3.0" />
        <TextBlock x:Name="ArmiesValue" Margin="10, 0, 10, 0" FontSize="22" FontFamily="Swiss" HorizontalAlignment="Left" VerticalAlignment="Center" Foreground="Black">88/88</TextBlock>
        <Rectangle Stretch="Fill" RadiusX="3.0" RadiusY="3.0" Fill="{StaticResource GlassHighlight}" />            
      </Grid>
    </StackPanel>

    <StackPanel Orientation="Horizontal" Grid.Row="0" Grid.Column="4">      
      <TextBlock  VerticalAlignment="Center" HorizontalAlignment="Left" FontFamily="Swiss" FontSize="22">TIME</TextBlock>
      <Grid Margin="4, 0, 4, 0">
        <Rectangle Stretch="Fill" Fill="#FFFF9C00" RadiusX="3.0" RadiusY="3.0" />
        <TextBlock x:Name="TimeValue" Margin="10, 0, 10, 0" FontSize="22" FontFamily="Swiss" HorizontalAlignment="Left" VerticalAlignment="Center" Foreground="Black">88:88:88</TextBlock>
        <Rectangle Stretch="Fill" RadiusX="3.0" RadiusY="3.0" Fill="{StaticResource GlassHighlight}" />            
      </Grid>
    </StackPanel>
  </Grid>

  <Grid Grid.Row="0" Grid.RowSpan="3" Grid.Column="2">
    <Grid.RowDefinitions>
      <RowDefinition Height="1.5*" />
      <RowDefinition Height="*" />
      <RowDefinition Height="1.5*" />
    </Grid.RowDefinitions>
    <Grid.ColumnDefinitions>
      <ColumnDefinition Width="*" />
    </Grid.ColumnDefinitions>

    <Grid Grid.Row="0" Grid.Column="0" Background="Black">
      <Radar Margin="4, 4, 4, 10" x:Name="Radar" /> 
      <Rectangle Stroke="#FFFF9C00" StrokeThickness="2" Stretch="Fill" IsHitTestVisible="false"> 
        <Rectangle.Fill>
          <LinearGradientBrush SpreadMethod="Pad" StartPoint="0.5, -0.2" EndPoint="0.5, 0.0">
            <LinearGradientBrush.GradientStops>
             <GradientStop Color="#000000FF" Offset="0"/>
             <GradientStop Color="#080000FF" Offset="0.1"/> 
             <GradientStop Color="#280000FF" Offset="0.9"/> 
             <GradientStop Color="#000000FF" Offset="1.0"/> 
            </LinearGradientBrush.GradientStops>                 
          </LinearGradientBrush>    
        </Rectangle.Fill>
        <Rectangle.Triggers>
          <EventTrigger RoutedEvent="UIScene.TransitionIn">
            <EventTrigger.Actions>
              <BeginStoryboard>
                  <Storyboard>
                    <PointAnimation Duration="00:00:15" Storyboard.TargetProperty="Fill.EndPoint" To="0.5, 3.0" RepeatBehavior="Forever" />
                    <PointAnimation Duration="00:00:15" Storyboard.TargetProperty="Fill.StartPoint" To="0.5, 3.0" RepeatBehavior="Forever" />
                  </Storyboard>
              </BeginStoryboard>
            </EventTrigger.Actions>        
          </EventTrigger>
        </Rectangle.Triggers>   
      </Rectangle>

    </Grid>
    
    <Grid Grid.Row="1" Grid.Column="0">
      <Rectangle Stroke="#FFFF9C00" StrokeThickness="2" Stretch="Fill" />     
      <Grid Margin="2, 2, 2, 2">
        <Rectangle Stroke="Black" StrokeThickness="2" Stretch="Fill" />     
        <TextBlock x:Name="DetailViewTitle" VerticalAlignment="Top" HorizontalAlignment="Center" />
        <DetailViewWindow x:Name="DetailViewWindow">
          <DetailViewWindow.Triggers>
            <EventTrigger RoutedEvent="DetailViewWindow.DetailItemChanged">
              <BeginStoryboard>
                <BeginStoryboard.Storyboard>
                  <Storyboard>
                    <SingleAnimation Storyboard.TargetName="DetailCoveringPanel" FillBehavior="Stop" Storyboard.TargetProperty="Fill.GradientStops[0].Offset" From="0.0" To="1.0" Duration="00:00:0.6" />
                    <SingleAnimation Storyboard.TargetName="DetailCoveringPanel" FillBehavior="Stop" Storyboard.TargetProperty="Fill.GradientStops[1].Offset" From="0.0" To="1.0" Duration="00:00:0.3" />
                  </Storyboard>
                </BeginStoryboard.Storyboard>
              </BeginStoryboard>
            </EventTrigger>
          </DetailViewWindow.Triggers>
        </DetailViewWindow>
        <StackPanel VerticalAlignment="Bottom" HorizontalAlignment="Left">
          <TextBlock x:Name="DetailViewResources" />    
        </StackPanel>
        
        <Rectangle x:Name="DetailCoveringPanel" Stretch="Fill">
          <Rectangle.Fill>
            <LinearGradientBrush StartPoint="0.0, 0.0" EndPoint="1.0, 1.0">
              <LinearGradientBrush.GradientStops>
                <GradientStop Color="#00000000" Offset="1.0" />
                <GradientStop Color="Black" Offset="1.0" />
              </LinearGradientBrush.GradientStops>
            </LinearGradientBrush>          
          </Rectangle.Fill>
        </Rectangle>
        
      </Grid>
    </Grid>

    <Grid Background="Black" Grid.Row="2" Grid.Column="0">
      <Grid.Resources>
        <Style x:Key="BlendInPanel" TargetType="{x:Type Panel}">
          <Style.Triggers>
            <Trigger Property="Visibility" Value="Visible">
              <Trigger.EnterActions>
                <BeginStoryboard>
                  <BeginStoryboard.Storyboard>
                    <Storyboard>
                      <SingleAnimation Storyboard.TargetProperty="Opacity" FillBehavior="Stop" From="0.0" To="1.0" Duration="00:00:00.5" />
                    </Storyboard>
                  </BeginStoryboard.Storyboard>
                </BeginStoryboard>              
              </Trigger.EnterActions>
            </Trigger>
          </Style.Triggers>
        </Style>
      </Grid.Resources>
      <Grid>
        <Grid.RowDefinitions>
          <RowDefinition Height="auto" />
          <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>
        
        <!-- Action menu panel. Will include buttons for transport, refit, etc, etc. -->
        <StackPanel x:Name="OrbitPanel" Style="{StaticResource BlendInPanel}">
          <StackPanel>
            <TextBlock HorizontalAlignment="Center">Planet Menu</TextBlock>
            <ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Disabled">
              <Grid>
                <Grid.RowDefinitions>
                  <RowDefinition Height="auto" />
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="*" />
                  <ColumnDefinition Width="*" />
                </Grid.ColumnDefinitions>                
                <Button Margin="5, 5, 5, 5">Bomb</Button>
                <Button Margin="5, 5, 5, 5" Grid.Column="1">Transport</Button>
              </Grid>
            </ScrollViewer>
          </StackPanel>        
          <StackPanel x:Name="RefitPanel" Margin="5, 5, 5, 5" Style="{StaticResource BlendInPanel}">
            <TextBlock HorizontalAlignment="Center">Refit Menu</TextBlock>
            <ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Disabled">
              <StackPanel HorizontalAlignment="Center" Orientation="Horizontal">
                <Button x:Name="RefitScout">Scout</Button>
                <Button x:Name="RefitCruiser">Cruiser</Button>
                <Button x:Name="RefitAssault">Assault</Button>
                <Button x:Name="RefitBattleship">Battleship</Button>
                <Button x:Name="RefitDestroyer">Destroyer</Button>
                <Button x:Name="RefitStarbase">Starbase</Button>
              </StackPanel>
            </ScrollViewer>
          </StackPanel>
        </StackPanel>
              
        <Grid Grid.Row="1">
          <Grid.Background>
            <LinearGradientBrush StartPoint="0.5, 0.0" EndPoint="1.0, 1.0">
              <LinearGradientBrush.GradientStops>
                <GradientStop Color="Black" Offset="0" />
                <GradientStop Color="#FF7F4E00" Offset="1.0" />
              </LinearGradientBrush.GradientStops>
            </LinearGradientBrush>          
          </Grid.Background>
          <MultiColumnList x:Name="PlayerList" FontSize="22" FontFamily="Swiss">
            <MultiColumnList.Columns>
                <MultiColumnListColumn Width="20" Text="NO" />    
                <MultiColumnListColumn Width="20" Text="TY" />    
                <MultiColumnListColumn Width="30" Text="RNK" />    
                <MultiColumnListColumn Width="80" Text="NAME" />    
                <MultiColumnListColumn Width="35" Text="KLS" />    
                <MultiColumnListColumn Width="35" Text="WIN" />    
                <MultiColumnListColumn Width="35" Text="LOS" />    
                <MultiColumnListColumn Width="40" Text="RATIO" />    
                <MultiColumnListColumn Width="35" Text="OFF" />    
                <MultiColumnListColumn Width="35" Text="DEF" />    
                <MultiColumnListColumn Width="35" Text="DI" />    
            </MultiColumnList.Columns>
          </MultiColumnList>
        </Grid>
      </Grid>
    </Grid>

  </Grid>
  <GridSplitter Grid.Column="1" Width="5" VerticalAlignment="Stretch" HorizontalAlignment="Left" Grid.RowSpan="3" /> 
</Grid>

